package com.itheima.project.face.impl;

import com.itheima.project.exception.ProjectException;
import com.itheima.project.face.IndexFace;
import com.itheima.project.service.IndexService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author mrchen
 * @date 2022/3/25 15:00
 */
@Service
@Slf4j
public class IndexFaceImpl implements IndexFace {
    @Autowired
    private IndexService indexService;
    @Override
    public void createIndex(Class<?> tclass) throws ProjectException {
        indexService.createIndex(tclass);
    }
    @Override
    public void createIndex(String source, String indexName) throws ProjectException {
        indexService.createIndex(source,indexName);
    }
    @Override
    public boolean existIndex(Class<?> tclass) throws ProjectException {
        return indexService.existIndex(tclass);
    }
    @Override
    public boolean existIndex(String indexName) throws ProjectException {
        return indexService.existIndex(indexName);
    }
    @Override
    public void deleteIndex(String indexName) throws ProjectException {
        indexService.deleteIndex(indexName);
    }
    @Override
    public void deleteIndex(Class<?> tclass) throws ProjectException {
        indexService.deleteIndex(tclass);
    }
}
